package edu.cmu.atlub.api;

import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;

import org.apache.http.HttpEntity;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.params.HttpParams;

public class BaseAPI {

    public InputStream getAPIInputStream(String apiUrl, HashMap<String, String> params) throws ClientProtocolException,
	    IOException {
	HttpEntity authedHttpEntity = HttpConnectionManager.getHttpEntity(apiUrl, params);
	if (authedHttpEntity != null) {
	    return authedHttpEntity.getContent();
	}
	return null;
    }
}
